﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

namespace Eventhere.Controls
{
    public partial class OptionPane : UserControl
    {
        public OptionPane()
        {
            InitializeComponent();
            this.CancelImage.MouseEnter += CancelImage_Click;
            this.AddImage.MouseEnter += AddImage_Click;
            this.RemoveImage.MouseEnter += RemoveImage_MouseEnter;
            this.EditImage.MouseEnter += EditImage_MouseEnter;
            this.AddGroup.MouseEnter += AddGroup_MouseEnter;
        }

        void AddGroup_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
        {
            AddGroupe(this, null);   
        }

        void EditImage_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
        {
            EditUser(this, null);
        }

        void RemoveImage_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
        {
            RemoveUser(this, null);
        }

        void AddImage_Click(object sender, RoutedEventArgs e)
        {
            AddUser(this, null);
        }

        void CancelImage_Click(object sender, RoutedEventArgs e)
        {
            Cancel(this,null);
        }

        public event Action<object, EventArgs> Cancel;
        public event Action<object, EventArgs> AddUser;
        public event Action<object, EventArgs> EditUser;
        public event Action<object, EventArgs> RemoveUser;
        public event Action<object, EventArgs> AddGroupe;
    }
}
